﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesBSW.DAL.MesDB
{
    [Serializable]
    [Table("pp_scan")]
    public class ProdProcScan
    {
        /// <summary>
        /// id，主键，自增长
        /// </summary>
        [Column("id"),Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 工单ID，取target_prod_process表的ID值
        /// </summary>
        [Column("pp_id")]
        public int ProdProcID { get; set; }


        /// <summary>
        /// 工单单号
        /// </summary>
        [Column("prod_number")]
        public string ProdNumber { get; set; }

        /// <summary>
        /// 站点ID值
        /// </summary>
        [Column("site_id")]
        public int SiteInfoID { get; set; }


        /// <summary>
        /// 站点名称
        /// </summary>
        [Column("site_name")]
        public string SiteName { get; set; }

        /// <summary>
        /// 工单状态
        /// </summary>
        [Column("status_id")]
        public int StatusInfoID { get; set; }

        /// <summary>
        /// 工单状态名称
        /// </summary>
        [Column("status_name")]
        public string StatusName { get; set; }

        /// <summary>
        /// 扫描数量
        /// </summary>
        [Column("scan_qty")]
        public decimal ScanQty { get; set; }

        /// <summary>
        /// 是否已完成，暂时只对包装完成站点有效，包装完成站点可以分批入库
        /// </summary>
        [Column("is_comp")]
        public int? IsComp {  get; set; }

        /// <summary>
        /// 扫码员工
        /// </summary>
        [Column("scan_user")]
        public string ScanUser { get; set; }

        /// <summary>
        /// 扫码员工姓名
        /// </summary>
        [NotMapped]
        public string RealName { get; set; }

        /// <summary>
        /// 扫码日期
        /// </summary>
        [Column("scan_date")]
        public DateTime ScanDate { get; set; }
    }
}
